Portable electronic devices, such as cellular phones, commonly employ one or more integral light sources. These light sources may provide illumination for a scene recorded by a camera integrated into the device. As an example, U.S. Pat. No. 9,400,177 describes a pattern projector, including a light source, configured to emit a beam of light. The inventors describe a system for 3D mapping, which may be produced as a very compact unit, for example being included in a mobile station (e.g., PDA, cellular phone) and/or a portable computer.